﻿Public Class BusquedaAvanzada

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim i As Integer = 10
        If (TextBox1.Text = "") Then
            i += 2
        End If
        If (TextBox2.Text = "") Then
            i += 2
        End If
        If (TextBox3.Text = "") Then
            i += 2
        End If
        If (TextBox4.Text = "") Then
            i += 2
        End If

        Dim a As Integer = nextRandom(i, 0)
        Dim b As Integer = nextRandom(i, 0)
        If (a = 0 Or b = 0) Then
            MsgBox(AcceptButton, MsgBoxStyle.Information, "No se encontraron coincidencias")
            Exit Sub
        End If


        MainForm.addRandomItems(a, b)

        Close()

    End Sub
End Class